/*9F/9MPXo2D1anesP9AOJ38uoYuFDZ77vzV42LzrSGiC6o8+LXDgU0nVK/HlfBOGd*/
/*
 * @Author: xiahui
 * @PageInfo: 影像查看
 * @Date: 2019-04-25 13:39:43
 * @Last Modified by: tianzhyw
 * @Last Modified time: 2022-05-24 14:52:53
 */
import { PAGECODE, AREA, FIELDS, FSTATUSFLAG } from '../../constance';
import { SCMImageView } from 'scmpub/scmpub/components/Image';
import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';

export default function(props) {
	// let openbillid = props.getUrlParam('id');
	let openbillid = props.form.getFormItemsValue(AREA.cardFormId, FIELDS.pk_ct_pu).value;

	let fstatusflag = props.form.getFormItemsValue(AREA.cardFormId, FIELDS.fstatusflag).value;
	let blatest = props.form.getFormItemsValue(AREA.cardFormId, FIELDS.blatest).value;
	//此标志判断是否变更过,blatest为true则不是最原始版本那就是做过变更，false是最原始版本
	if (blatest != true) {
		//此处判断合同状态，是否生效（1代表生效），生效时取当前主键（生效时，原始主键就是当前主键），其余别的时候取原始主键
		if (fstatusflag != FSTATUSFLAG.validate) {
			let pk_origct = props.form.getFormItemsValue(AREA.cardFormId, FIELDS.pk_origct).value;
			openbillid = pk_origct ? pk_origct : openbillid;
		}
	}
	let billdata = props.createMasterChildData(PAGECODE.cardPagecode, AREA.cardFormId, AREA.cardTableId);
	let data = {};
	data.billId = openbillid;
	data.billType = props.form.getFormItemsValue(AREA.cardFormId, FIELDS.vtrantypecode).value;
	data.tranTypeId = billdata.head[AREA.cardFormId].rows[0].values[FIELDS.vtrantypecode].value;
	data.pk_org = billdata.head[AREA.cardFormId].rows[0].values[FIELDS.pk_org].value;
	data.imageDisableHint = getLangByResId(this, '4004PURDAILY-000067'); //"影像管理模块没有启用！"  add by congke
	SCMImageView.call(this, props, data);
}

/*9F/9MPXo2D1anesP9AOJ38uoYuFDZ77vzV42LzrSGiC6o8+LXDgU0nVK/HlfBOGd*/